package com.learn.codesourcelearn.spring;

import java.lang.reflect.Method;

import net.sf.cglib.proxy.MethodInterceptor;
import net.sf.cglib.proxy.MethodProxy;

public class TeacherMethodInterceptor implements MethodInterceptor {
    @Override
    public Object intercept(Object o,Method method,Object[] objects,MethodProxy methodProxy) throws Throwable{

        System.out.println("调用前。。。");
        Object obj = methodProxy.invokeSuper(o,objects);
        System.out.println("调用后。。。");
        return obj;
    }
}
